<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
</head>

<body>

  <div class="page-group">
    <div class="page page-current">

      <header class="bar bar-nav fs-header-small">
        <a onclick="window.history.back();" class="icon icon-left pull-left"></a>
        <h1 class="title">上课课件</h1>
      </header>

      <div class="content">
      
        <div class="schedule-warp">
          <div class="content-padded no-margin">
            <div class="row course-schedule">
              <c:forEach var="courseSchedule" items="${courseSchedules}" varStatus="status">
                <c:choose>
                
                  <c:when test="${courseSchedule.scheduleStatus.finish}">
	                  <div class="col-33 finished">
	                    <a href="#">
	                      <fmt:formatDate value="${courseSchedule.occurDate}" pattern="MM月dd日"/><br>
	                      ${courseSchedule.occurHour}<br>
	                      ${courseSchedule.coach.name}<br>
	                      <span style="color: #777; line-height: 1.2rem">查看寄语</span>
	                    </a>
	                    <span class="number">${status.index + 1}</span>
	                  </div>
                  </c:when>
                  
                  <c:when test="${courseSchedule.scheduleStatus.ready}">
                    <div class="col-33 waiting">
                      <a href="#">
                        <fmt:formatDate value="${courseSchedule.occurDate}" pattern="MM月dd日"/><br>
                        ${courseSchedule.occurHour}<br>
                        ${courseSchedule.coach.name}<br>
                     </a>
                     <span class="number">${status.index + 1}</span>
                    </div>
                  </c:when>
                  
                  <c:when test="${courseSchedule.scheduleStatus.expiry}">
                    <div class="col-33 expiry">
                      <a href="#">
                        <fmt:formatDate value="${courseSchedule.occurDate}" pattern="MM月dd日"/><br>
                        ${courseSchedule.occurHour}<br>
                        ${courseSchedule.coach.name}<br>
                        <span style="color: #777; line-height: 1.2rem">课程逾期</span>
                     </a>
                     <span class="number">${status.index + 1}</span>
                    </div>
                  </c:when>
                  
                  <c:when test="${courseSchedule.scheduleStatus.schedule}">
                    <div class="col-33 undo">
                      <a href="#" style="text-align: left;">
                                                                      待预约
                      </a>
                      <span class="number">${status.index + 1}</span>
                    </div>
                  </c:when>
                  
                </c:choose>
              </c:forEach>
            </div>
          </div>
        </div>
                
      </div>
      
    </div>  
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>

</body>
</html>